inherited FRelatorioClientesVSCompras: TFRelatorioClientesVSCompras
  Left = 224
  Top = 77
  Width = 1044
  Height = 646
  Caption = 'TABELAS / CLIENTES'
  OldCreateOrder = True
  PixelsPerInch = 96
  TextHeight = 16
  inherited Panel1: TPanel
    Width = 1036
  end
  inherited Panel2: TPanel
    Width = 1036
    Caption = 'LISTAGEM DOS CLIENTES'
  end
  inherited GroupBox1: TGroupBox
    object Label4: TLabel
      Left = 14
      Top = 80
      Width = 40
      Height = 16
      Caption = 'Cidade'
    end
    object Label5: TLabel
      Left = 14
      Top = 48
      Width = 41
      Height = 16
      Caption = 'Estado'
    end
    object edCidade: TEdit
      Left = 168
      Top = 80
      Width = 153
      Height = 22
      CharCase = ecUpperCase
      TabOrder = 1
    end
    object ComboBox1: TComboBox
      Left = 64
      Top = 80
      Width = 97
      Height = 24
      ItemHeight = 16
      ItemIndex = 0
      TabOrder = 4
      Text = 'Igual a'
      Items.Strings = (
        'Igual a'
        'Diferente de'
        'Contendo')
    end
    object edEstado: TEdit
      Left = 168
      Top = 48
      Width = 41
      Height = 22
      CharCase = ecUpperCase
      TabOrder = 0
    end
    object ComboBox2: TComboBox
      Left = 64
      Top = 48
      Width = 97
      Height = 24
      ItemHeight = 16
      ItemIndex = 0
      TabOrder = 5
      Text = 'Igual a'
      Items.Strings = (
        'Igual a'
        'Diferente de'
        'Contendo')
    end
    object CheckBox1: TCheckBox
      Left = 14
      Top = 117
      Width = 281
      Height = 17
      Caption = 'Clientes que nunca compraram'
      TabOrder = 2
      OnClick = CheckBox1Click
    end
    object CheckBox4: TCheckBox
      Left = 14
      Top = 147
      Width = 177
      Height = 17
      Caption = 'Clientes que j'#225' compraram'
      TabOrder = 3
      OnClick = CheckBox4Click
    end
    object GroupBox4: TGroupBox
      Left = 8
      Top = 178
      Width = 313
      Height = 81
      Caption = ' Periodo de compra '
      TabOrder = 6
      object TLabel
        Left = 152
        Top = 40
        Width = 7
        Height = 16
        Caption = #224
      end
    end
    object DateEdit1: TDateEdit
      Left = 24
      Top = 216
      Width = 121
      Height = 21
      Enabled = False
      NumGlyphs = 2
      TabOrder = 7
    end
    object DateEdit2: TDateEdit
      Left = 184
      Top = 216
      Width = 121
      Height = 21
      Enabled = False
      NumGlyphs = 2
      TabOrder = 8
    end
  end
  inherited GroupBox2: TGroupBox
    inherited Bevel1: TBevel
      Top = 279
    end
    inherited Label2: TLabel
      Top = 263
    end
    inherited edSubTitulo: TEdit
      Width = 271
    end
    inherited rbRelatorio: TRadioButton
      Top = 287
    end
    inherited rbExcel: TRadioButton
      Top = 303
    end
    inherited rbPDF: TRadioButton
      Top = 319
    end
    inherited btnExecutar: TBitBtn
      Top = 322
    end
    object RadioGroup1: TRadioGroup
      Left = 8
      Top = 55
      Width = 271
      Height = 98
      BiDiMode = bdRightToLeft
      Caption = '  Ordena'#231#227'o  '
      ItemIndex = 0
      Items.Strings = (
        'C'#243'digo do Cliente'
        'Raz'#227'o Social'
        'Nome Fantasia'
        'Cidade/Estado')
      ParentBiDiMode = False
      TabOrder = 5
      OnClick = RadioGroup1Click
    end
    object RadioGroup2: TRadioGroup
      Left = 135
      Top = 82
      Width = 141
      Height = 67
      Enabled = False
      ItemIndex = 0
      Items.Strings = (
        'C'#243'digo do Cliente'
        'Raz'#227'o Social'
        'Nome Fantasia')
      TabOrder = 6
    end
    object GroupBox3: TGroupBox
      Left = 8
      Top = 162
      Width = 269
      Height = 57
      Caption = '  Apresentar  '
      TabOrder = 7
      object CheckBox2: TCheckBox
        Left = 8
        Top = 35
        Width = 233
        Height = 17
        Caption = 'Segunda linha de endere'#231'o'
        TabOrder = 0
      end
      object CheckBox3: TCheckBox
        Left = 8
        Top = 17
        Width = 241
        Height = 17
        Caption = 'CNPJ/CPF / Inscri'#231#227'o Estadual'
        TabOrder = 1
      end
    end
  end
  inherited RLReport: TRLReport
    Left = 8
    DataSource = DSPesquisa
    object RLBand2: TRLBand
      Left = 38
      Top = 138
      Width = 718
      Height = 31
      Borders.Sides = sdCustom
      Borders.DrawLeft = False
      Borders.DrawTop = True
      Borders.DrawRight = False
      Borders.DrawBottom = False
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -11
      Font.Name = 'Arial'
      Font.Style = []
      ParentFont = False
      object RLDBText2: TRLDBText
        Left = 0
        Top = 2
        Width = 42
        Height = 14
        Alignment = taCenter
        AutoSize = False
        DataField = 'CLI_CODIGO'
        DataSource = DSPesquisa
      end
      object RLDBText3: TRLDBText
        Left = 57
        Top = 0
        Width = 208
        Height = 14
        AutoSize = False
        DataField = 'CLI_RAZAO'
        DataSource = DSPesquisa
      end
      object RLDBText4: TRLDBText
        Left = 581
        Top = 0
        Width = 51
        Height = 14
        DataField = 'CLI_FONE'
        DataSource = DSPesquisa
      end
      object RLDBText5: TRLDBText
        Left = 645
        Top = 0
        Width = 45
        Height = 14
        DataField = 'CLI_FAX'
        DataSource = DSPesquisa
      end
      object RLDBText6: TRLDBText
        Left = 493
        Top = 0
        Width = 85
        Height = 14
        AutoSize = False
        DataField = 'CLI_CONTATO'
        DataSource = DSPesquisa
      end
      object RLDBText17: TRLDBText
        Left = 267
        Top = 0
        Width = 214
        Height = 14
        AutoSize = False
        DataField = 'CLI_FANTASIA'
        DataSource = DSPesquisa
      end
      object RLDBText18: TRLDBText
        Left = 57
        Top = 15
        Width = 207
        Height = 14
        AutoSize = False
        DataField = 'CLI_CPFCNPJ'
        DataSource = DSPesquisa
        Text = 'CNPJ/CPF: '
      end
      object RLDBText19: TRLDBText
        Left = 265
        Top = 15
        Width = 208
        Height = 14
        AutoSize = False
        DataField = 'CLI_INSCESTADUAL'
        DataSource = DSPesquisa
        Text = 'Inscri'#231#227'o Estadual: '
      end
    end
    object RLBand3: TRLBand
      Left = 38
      Top = 169
      Width = 718
      Height = 15
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -11
      Font.Name = 'Arial'
      Font.Style = []
      ParentFont = False
      BeforePrint = RLBand3BeforePrint
      object RLDBText7: TRLDBText
        Left = 0
        Top = 0
        Width = 53
        Height = 13
        AutoSize = False
        DataField = 'CLI_TIPO_ENDERECO_CORRESP'
        DataSource = DSPesquisa
      end
      object RLDBText8: TRLDBText
        Left = 57
        Top = 0
        Width = 296
        Height = 13
        AutoSize = False
        DataField = 'CLI_ENDERECOCORRESP'
        DataSource = DSPesquisa
      end
      object RLDBText9: TRLDBText
        Left = 361
        Top = 0
        Width = 47
        Height = 14
        AutoSize = False
        DataField = 'CLI_NUMERO_ENDERECO_CORRESP'
        DataSource = DSPesquisa
      end
      object RLDBText10: TRLDBText
        Left = 417
        Top = 0
        Width = 111
        Height = 14
        DataField = 'CLI_BAIRROCORRESP'
        DataSource = DSPesquisa
      end
      object RLDBText11: TRLDBText
        Left = 553
        Top = 0
        Width = 109
        Height = 14
        DataField = 'CLI_CIDADECORRESP'
        DataSource = DSPesquisa
        BeforePrint = RLDBText11BeforePrint
      end
    end
    object RLBand4: TRLBand
      Left = 38
      Top = 184
      Width = 718
      Height = 15
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -11
      Font.Name = 'Arial'
      Font.Style = []
      ParentFont = False
      BeforePrint = RLBand4BeforePrint
      object RLDBText12: TRLDBText
        Left = 0
        Top = 0
        Width = 53
        Height = 13
        AutoSize = False
        DataField = 'CLI_TIPO_ENDERECO_PEDIDO'
        DataSource = DSPesquisa
      end
      object RLDBText13: TRLDBText
        Left = 57
        Top = 0
        Width = 296
        Height = 13
        AutoSize = False
        DataField = 'CLI_ENDERECOPEDIDO'
        DataSource = DSPesquisa
      end
      object RLDBText14: TRLDBText
        Left = 361
        Top = 0
        Width = 47
        Height = 14
        AutoSize = False
        DataField = 'CLI_NUMERO_ENDERECO_PEDIDO'
        DataSource = DSPesquisa
      end
      object RLDBText15: TRLDBText
        Left = 417
        Top = 0
        Width = 99
        Height = 14
        DataField = 'CLI_BAIRROPEDIDO'
        DataSource = DSPesquisa
      end
      object RLDBText16: TRLDBText
        Left = 553
        Top = 0
        Width = 97
        Height = 14
        DataField = 'CLI_CIDADEPEDIDO'
        DataSource = DSPesquisa
        BeforePrint = RLDBText16BeforePrint
      end
    end
    object RLBand5: TRLBand
      Left = 38
      Top = 120
      Width = 718
      Height = 18
      BandType = btColumnHeader
      Borders.Sides = sdCustom
      Borders.DrawLeft = False
      Borders.DrawTop = False
      Borders.DrawRight = False
      Borders.DrawBottom = True
      Borders.FixedBottom = True
      object RLLabel1: TRLLabel
        Left = 4
        Top = 2
        Width = 36
        Height = 14
        Caption = 'C'#243'digo'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel2: TRLLabel
        Left = 57
        Top = 2
        Width = 66
        Height = 14
        Caption = 'Raz'#227'o Social'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel3: TRLLabel
        Left = 268
        Top = 2
        Width = 74
        Height = 14
        Caption = 'Nome Fantasia'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel4: TRLLabel
        Left = 492
        Top = 2
        Width = 40
        Height = 14
        Caption = 'Contato'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel5: TRLLabel
        Left = 580
        Top = 2
        Width = 27
        Height = 14
        Caption = 'Fone'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel6: TRLLabel
        Left = 644
        Top = 2
        Width = 21
        Height = 14
        Caption = 'Fax'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
    end
  end
  inherited QPesquisa: TQuery
    SQL.Strings = (
      'SELECT'
      '  CLIENTE.CLI_CODIGO,'
      '  CLIENTE.CLI_RAZAO,'
      '  CLIENTE.CLI_FANTASIA,'
      '  CLIENTE.CLI_CPFCNPJ,'
      'CLIENTE.CLI_INSCESTADUAL,'
      '  CLIENTE.CLI_FONE,'
      '  CLIENTE.CLI_FAX,'
      '  CLIENTE.CLI_EMAIL,'
      '  CLIENTE.CLI_ENDERECOCORRESP,'
      '  CLIENTE.CLI_BAIRROCORRESP,'
      '  CLIENTE.CLI_CEPCORRESP,'
      '  CLIENTE.CLI_CIDADECORRESP,'
      '  CLIENTE.CLI_ESTADOCORRESP,'
      '  CLIENTE.CLI_ENDERECOPEDIDO,'
      '  CLIENTE.CLI_BAIRROPEDIDO,'
      '  CLIENTE.CLI_CEPPEDIDO,'
      '  CLIENTE.CLI_CIDADEPEDIDO,'
      '  CLIENTE.CLI_ESTADOPEDIDO,'
      '  CLIENTE.CLI_VENDEDOR,'
      '  CLIENTE.CLI_CONTATO,'
      '  CLIENTE.CLI_SITUACAO,'
      '  CLIENTE.CLI_TIPO_ENDERECO_CORRESP,'
      '  CLIENTE.CLI_TIPO_ENDERECO_PEDIDO,'
      '  CLIENTE.CLI_NUMERO_ENDERECO_CORRESP,'
      '  CLIENTE.CLI_NUMERO_ENDERECO_PEDIDO,'
      '  MAX(PEDIDOVENDA.PED_DATA) AS ULTIMA_COMPRA'
      'FROM'
      '  CLIENTE'
      
        '  LEFT  JOIN PEDIDOVENDA ON (CLIENTE.CLI_CODIGO = PEDIDOVENDA.PE' +
        'D_CLIENTE)'
      '                        AND (PEDIDOVENDA.PED_SITUACAO = 1)'
      'GROUP BY'
      '  CLIENTE.CLI_CODIGO,'
      '  CLIENTE.CLI_RAZAO,'
      '  CLIENTE.CLI_FANTASIA,'
      '  CLIENTE.CLI_CPFCNPJ,'
      '  CLIENTE.CLI_FONE,'
      '  CLIENTE.CLI_FAX,'
      '  CLIENTE.CLI_EMAIL,'
      '  CLIENTE.CLI_ENDERECOCORRESP,'
      '  CLIENTE.CLI_BAIRROCORRESP,'
      '  CLIENTE.CLI_CEPCORRESP,'
      '  CLIENTE.CLI_CIDADECORRESP,'
      '  CLIENTE.CLI_ESTADOCORRESP,'
      '  CLIENTE.CLI_ENDERECOPEDIDO,'
      '  CLIENTE.CLI_BAIRROPEDIDO,'
      '  CLIENTE.CLI_CEPPEDIDO,'
      '  CLIENTE.CLI_CIDADEPEDIDO,'
      '  CLIENTE.CLI_ESTADOPEDIDO,'
      '  CLIENTE.CLI_VENDEDOR,'
      '  CLIENTE.CLI_CONTATO,'
      '  CLIENTE.CLI_SITUACAO,'
      '  CLIENTE.CLI_TIPO_ENDERECO_CORRESP,'
      '  CLIENTE.CLI_TIPO_ENDERECO_PEDIDO,'
      '  CLIENTE.CLI_NUMERO_ENDERECO_CORRESP,'
      '  CLIENTE.CLI_NUMERO_ENDERECO_PEDIDO')
    Left = 416
    Top = 41
  end
  inherited DSPesquisa: TDataSource
    Left = 472
    Top = 38
  end
end
